injectVars.js ➔ ... ➔ ???   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
dl 0
loc 1
rs 10
c 0
b 0
f 0
nop 2
1
/**
2
 * Created by AlexEOL on 22.02.17.
3
 */
4
const webpack = require('webpack');
5
const keys = require('lodash/keys');
6
7
module.exports = vars => new webpack.DefinePlugin((
8
  keys(vars).reduce((prev, next) => Object.assign(prev, { [next]: JSON.stringify(vars[next]) }), {})
9
));
10